]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overview: Pass drag source on item-drag-* signals
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 23 Jun 2020 13:30:33 +0000 (10:30 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 24 Jun 2020 21:06:21 +0000 (18:06 -0300)
Overview has signals to notify about starting, cancelling, and
finishing icon drags, but none of these signals pass the dragged
item to the callbacks.

Pass the dragged items to the 'item-drag-*' overview signals.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1332

js/ui/overview.js

index 471a7e3b72782a98cfb2691a82b1e44fcb864907..219645dd6ac4155d39636fccc6488bd3c4bbdd63 100644 (file)
@@ -440,19 +440,19 @@ var Overview = class {
         this.emit('windows-restacked', stackIndices);
     }
 
-    beginItemDrag(_source) {
-        this.emit('item-drag-begin');
+    beginItemDrag(source) {
+        this.emit('item-drag-begin', source);
         this._inItemDrag = true;
     }
 
-    cancelledItemDrag(_source) {
-        this.emit('item-drag-cancelled');
+    cancelledItemDrag(source) {
+        this.emit('item-drag-cancelled', source);
     }
 
-    endItemDrag(_source) {
+    endItemDrag(source) {
         if (!this._inItemDrag)
             return;
-        this.emit('item-drag-end');
+        this.emit('item-drag-end', source);
         this._inItemDrag = false;
     }